]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: fix keyboard hiding when user starts a new search
authorNohemi Fernandez <nf68@cornell.edu>
Sun, 9 Oct 2011 20:24:59 +0000 (16:24 -0400)
committerDan Winship <danw@gnome.org>
Thu, 13 Oct 2011 18:12:21 +0000 (14:12 -0400)
The keyboard hides prematurely when the user is typing into
an empty search box because the click is a captured event that
triggers a loss of entry focus. By adding a keyboard check to
this event, the problem is solved.

https://bugzilla.gnome.org/show_bug.cgi?id=661340

js/ui/viewSelector.js

index 4791d0bf12a676b1b19801d5d5cb68d404b65c59..2e3af18b755f1de0706a8c0ac99a3da74ca1b73d 100644 (file)
@@ -289,9 +289,11 @@ SearchTab.prototype = {
     _onCapturedEvent: function(actor, event) {
         if (event.type() == Clutter.EventType.BUTTON_PRESS) {
             let source = event.get_source();
-            if (source != this._text && this._text.text == '') {
+            if (source != this._text && this._text.text == '' &&
+                !Main.layoutManager.keyboardBox.contains(source)) {
                 // the user clicked outside after activating the entry, but
-                // with no search term entered - cancel the search
+                // with no search term entered and no keyboard button pressed
+                // - cancel the search
                 this._reset();
             }
         }